﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="carportal.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

table, table td { 
	padding:0;
	border:none;
	border-collapse:collapse;
}
        .style1
        {
            color: buttontext;
            font-size: 100%;
            vertical-align: top;
            border-style: none;
            border-color: inherit;
            border-width: 0;
            margin: 0;
            padding: 0;
            background:;
        }
        .style2
        {
            font-size: 100%;
            vertical-align: top;
            border-style: none;
            border-color: inherit;
            border-width: 0;
            margin: 0;
            padding: 0;
            background:;
        }
        .style3
        {
            font-weight: bold;
            font-size: 100%;
            vertical-align: top;
            border-style: none;
            border-color: inherit;
            border-width: 0;
            margin: 0;
            padding: 0;
            background:;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="font-weight: 700">
    
                <asp:SqlDataSource ID="SqlDataSourceMakes" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    SelectCommand="SELECT [id], [make_name] FROM [carportal_make]">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSourceModel" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:bestgifts4usConnectionString %>" 
                    
        SelectCommand="SELECT id, model, make_id FROM carportal_model WHERE (make_id = @makeid)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownListMakes" Name="makeid" 
                            PropertyName="SelectedValue" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <br />
                                                                   <asp:DropDownList ID="DropDownListMakes" runat="server" 
                                                                            
            DataSourceID="SqlDataSourceMakes" DataTextField="make_name" DataValueField="id" 
                                                                            
            Height="25px" Width="148px" AutoPostBack="True">
                                                                           </asp:DropDownList>
                                                                   
                                                                <br />
                                                                <asp:DropDownList ID="DropDownListModels" runat="server" 
                                        DataSourceID="SqlDataSourceModel" 
            DataTextField="model" DataValueField="id">
                                        <asp:ListItem Value="-1">Any</asp:ListItem>
                                    </asp:DropDownList> 
    
                <br />
                <asp:Button ID="Button1" runat="server" Text="Button" />
    
    </div>
    </form>
</body>
</html>
